﻿// Copyright 2009 (c) Tom van Dijck

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace Bonehead
{
    public partial class StartProfileDialog : Form
    {
        public StartProfileDialog()
        {
            InitializeComponent();
        }

        public string Executable
        {
            get { return mExectublePath.Text; }
        }

        public string Workingfolder
        {
            get { return mWorkingfolder.Text; }
        }

        public string Arguments
        {
            get { return mArguments.Text; }
        }

        private void mBrowseExe_Click(object sender, EventArgs e)
        {
            mFileBrowser.InitialDirectory = Workingfolder;
            if (mFileBrowser.ShowDialog() == DialogResult.OK)
            {
                mExectublePath.Text = mFileBrowser.FileName;
                mWorkingfolder.Text = Path.GetDirectoryName(mExectublePath.Text);
            }
        }

        private void mBrowseFolder_Click(object sender, EventArgs e)
        {
            mFolderBrowser.SelectedPath = Workingfolder;
            if (mFolderBrowser.ShowDialog() == DialogResult.OK)
            {
                mWorkingfolder.Text = mFolderBrowser.SelectedPath;
            }
        }
    }
}
